package com.ate.adapters;

import android.graphics.Color;
import android.widget.TextView;

import androidx.annotation.Nullable;

import com.ate.javamvp.R;
import com.ate.bean.TypeBean;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

/**
 * @author Ate
 * @description:
 * @date :2020/12/18 16:18
 */
public class ClassLeftRecyAdapter extends BaseQuickAdapter<TypeBean, BaseViewHolder> {


    public ClassLeftRecyAdapter(int layoutResId, @Nullable List<TypeBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, TypeBean item) {
        TextView textView = helper.getView(R.id.tv_classify);
        textView.setText(item.getName());

        if(item.isChecked()){
            textView.setTextColor(Color.RED);
            textView.setTextSize(25);
        }else {
            textView.setTextColor(Color.BLACK);
            textView.setTextSize(20);
        }

    }
}
